home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / fixes / fix024 / libray / libobj / bounds.c.diff < prev    next >
Encoding:
Text File  |  1994-08-09  |  768 b   |  29 lines

  1. *** bounds.c    Mon Oct 11 15:01:20 1993
  2. --- bounds.c.frac    Mon Oct 11 14:52:05 1993
  3. ***************
  4. *** 234,239 ****
  5. --- 234,256 ----
  6.       SetIfGreater(old[HIGH][Z], new[HIGH][Z]);
  7.   }
  8.   
  9. + /*
  10. +  * Enlarge bounding box so it contains the sphere centered at 'Center' with 
  11. +  * radius 'radius'.
  12. +  */
  13. + void
  14. + BoundsEnlargeSphere(bounds, Center, radius)
  15. + Float bounds[2][3], radius;
  16. + Vector *Center;
  17. + {
  18. +     SetIfLess(bounds[LOW][X], Center->x - radius);
  19. +     SetIfLess(bounds[LOW][Y], Center->y - radius);
  20. +     SetIfLess(bounds[LOW][Z], Center->z - radius);
  21. +     SetIfGreater(bounds[HIGH][X], Center->x + radius);
  22. +     SetIfGreater(bounds[HIGH][Y], Center->y + radius);
  23. +     SetIfGreater(bounds[HIGH][Z], Center->z + radius);
  24. + }
  25.   void
  26.   BoundsPrint(box, fp)
  27.   Float box[2][3];
  28.